//
//  UIView+CustomIBInspectable.m
//  YueZhanSwift
//
//  Created by 林购进 on 16/5/16.
//  Copyright © 2016年 lingoujin. All rights reserved.
//

#import "UIView+CustomIBInspectable.h"

@implementation UIView (CustomIBInspectable)

-(void)setCornerRadius:(CGFloat)cornerRadius{
    
    self.layer.masksToBounds = YES;
    self.layer.cornerRadius = cornerRadius;
}

-(CGFloat)cornerRadius{
    return self.layer.cornerRadius;
}

-(void)setBorderColor:(UIColor *)borderColor{
    self.layer.borderColor = borderColor.CGColor;
}

-(UIColor *)borderColor{
    return [UIColor colorWithCGColor:self.layer.borderColor];
}

-(void)setBorderWidth:(CGFloat)borderWidth{
    self.layer.borderWidth = borderWidth;
}

-(CGFloat)borderWidth{
    return self.layer.borderWidth;
}

@end
